package ru.st.selenium;

import java.util.List;
import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;

import org.testng.*;
import org.testng.annotations.*;

import static org.junit.Assert.*;
import static org.hamcrest.CoreMatchers.*;

import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.Select;

import ru.st.selenium.model.Film;

public class RemoveFilm extends ru.st.selenium.pages.TestBase {

	@Test
	public void testDeleteFilm() {
		app.getUserHelper().loginAs(ADMIN);
		app.getFilmHelper().deleteFilm();
		app.getUserHelper().logout();
	}
	
	

	
//  @Test
//  public void testRemoveMovie() throws Exception {
//    //Remove success film on testAddFilm_Success. Go to URL added film   
////  driver.get(movieAddress);
//		
//	//Find any Film
//	List<WebElement> FilmsList = driver.findElements(By.xpath("//div[contains(@class,'movie_box')]"));
//	int index = (int)(Math.random() * FilmsList.size());
//	FilmsList.get(index).click();
//		  
//	driver.findElement(By.xpath("//div[@id='content']//li[4]//a")).click();
//	    
//	assertTrue(closeAlertAndGetItsText().matches("^[\\s\\S]*$"));
//	    
//	WebElement MoviesList = waitWebElement(By.id("results"));
//	    
//	assertThat("My test film", is(not(driver.findElement(By.id("results")).getText())));
//  }
}
